#include <REGX52.H>
#include "Key.h"
#include "timer.h"
#include "serial.h"
#include "LCD1602.h"
#include "Motor.h"
#include "Pin.h"

unsigned int T0count = 0;

void main(){
	Timer0_Init();
	UART_Init();
	LCD_Init();
	LCD_ShowString(1,1,"stop");
	Motor = 0;
	while(1);
}

void Timer0_Rountine() interrupt 1{
	TL0 = 0xCD;		//设置定时初值
	TH0 = 0xF8;		//设置定时初值
	KeyCheck();
	T0count++;
	PWM_Control();
	T0count %= 100;
}

// 中断法判断字符串是否相等
void UsART() interrupt 4{	
	UART_Judge();
}